package com.egg.basic.fegin;

import com.egg.basic.fegin.fallback.BasicCaptchaFeignClientFallback;
import com.egg.basic.model.response.CaptchaInfo;
import com.egg.common.core.model.response.ResponseData;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(
        value = "basic"
        , url = "${api.feign.url.basic:}"
        , fallbackFactory = BasicCaptchaFeignClientFallback.class
)
public interface BasicCaptchaFeignClient {


    @GetMapping("/feign/captcha/image/create")
    ResponseData<CaptchaInfo> captchaImageCreateGet();

    @GetMapping("/feign/captcha/image/verify")
    ResponseData<Boolean> captchaImageVerifyGet(
            @ApiParam(value = "标识") @RequestParam(value = "id", required = false) String id
            , @ApiParam(value = "验证码") @RequestParam(value = "code", required = false) String code
    );


}
